import 'e-ui/lib/styles/components/cellbox.css'
import 'e-ui/lib/styles/components/heading.css'
import Avatar from 'e-ui/lib/Avatar'
import Img from 'e-ui/lib/Img'
import Heading from 'e-ui/lib/Heading'
import { Cellbox, CellItem } from 'e-ui/lib/cellbox'
import Placeholder from './Placeholder'

Heading.props.grade.default = '3'
Placeholder.props.text.default = '暂无数据'

Avatar.mounted = function () {
  this.$el.classList.add('avatar')
}

const components = [
  Avatar,
  Img,
  Heading,
  Cellbox,
  CellItem,
  Placeholder
]

const install = function (Vue, opts = {}) {
  for (let item of components) {
    item && item.componentName && Vue.component(item.componentName, item)
  }
}

export {
  install,
  Avatar,
  Img,
  Heading,
  Cellbox,
  CellItem,
  Placeholder
}
